//
//  SalesOrderDBObject.h
//  POS
//
//  Created by sigma xu on 4/22/13.
//  Copyright (c) 2013 sigma xu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "AppDelegate.h"

@interface SalesOrderDBO : NSObject{
    NSString *so_id;
    NSString *so_number;
    NSString *create_date;
    NSString *sales_man;
    NSString *total_amount;
    NSString *total_item;
    NSString *status;
    NSString *client;
    NSString *remark;
    
    sqlite3 *posDB;
    NSString *databasePath;
    sqlite3_stmt * sqlstmt;
    
    NSMutableArray *sales_order_list;
    
}
@property (nonatomic, readwrite) NSString *so_id;
@property (nonatomic, readwrite) NSString *so_number;
@property (nonatomic, readwrite) NSString *create_date;
@property (nonatomic, readwrite) NSString *sales_man;
@property (nonatomic, readwrite) NSString *total_amount;
@property (nonatomic, readwrite) NSString *total_item;
@property (nonatomic, readwrite) NSString *status;
@property (nonatomic, readwrite) NSString *client;
@property (nonatomic, readwrite) NSString *remark;

-(NSMutableArray *) get_all_sales_order;
-(SalesOrderDBO *) get_sales_order_by_so_id;
-(int) insert_sales_order;
-(void) update_sales_order;
-(void) delete_sales_order;


@end
